export interface GetAttrListParams {
  category1Id: number;
  category2Id: number;
  category3Id: number;
}

/*
  [
    {
      "id": 106,
      "attrName": "手机系统",
      "categoryId": 2,
      "categoryLevel": 1,
      "attrValueList": [
        {
          "id": 176,
          "valueName": "安卓手机",
          "attrId": 106
        },
        {
          "id": 175,
          "valueName": "苹果手机",
          "attrId": 106
        }
      ]
    },
  ]
*/

export interface AttrValueItem {
  id?: number;
  valueName: string;
  attrId?: number;
  isShowEdit?: boolean;
}

export type AttrValueList = AttrValueItem[];

export interface AttrItem {
  id?: number;
  attrName: string;
  categoryId?: number;
  categoryLevel?: number;
  attrValueList: AttrValueList;
}

export type AttrList = AttrItem[];

/*
  属性数据在组件中使用的类型
    {
      attrName: string;
      attrValueList: [
        {
          valueName: string;
          isShowEdit: boolean
        }
      ]
    }

  添加属性参数类型
    {
      "attrName": "string",
      "attrValueList": [
        {
          "valueName": "string"
        }
      ],
      "categoryId": 0,
      "categoryLevel": 0,
    }

  修改属性参数类型
    {
      "attrName": "string",
      "attrValueList": [
        {
          "attrId": 0,
          "id": 0,
          "valueName": "string"
        }
      ],
      "categoryId": 0,
      "categoryLevel": 0,
      "id": 0
    }

  总结：
    1. 所有场景都需要的属性，就是必选属性
    2. 有的要有的不要，就是可选属性
*/
